#ifndef BSP_ADC_H
#define BSP_ADC_H

#include "adc.h"

typedef union
{
    struct __packed
    {
        uint16_t IBUS;
        uint16_t NTC3;
        uint16_t NTC1;
        float IBUS_f;
        float NTC3_f;
        float NTC1_f;
    } ADC1_Channel;
    uint16_t ADC1_Value[3];
} ADC1data_t;

typedef union
{
    struct __packed
    {
        uint16_t ADSPE;
        uint16_t VA;
        uint16_t VB;
        uint16_t VC;
        uint16_t VBUS;
        uint16_t NTC2;
        float ADSPE_f;
        float VA_f;
        float VB_f;
        float VC_f;
        float VBUS_f;
        float NTC2_f;
    } ADC2_Channel;
    uint16_t ADC2_Value[6];
} ADC2data_t;

typedef struct
{
    ADC1data_t ADC1data;
    ADC2data_t ADC2data;
} ADCdata_t;

void BSP_ADC_Init(void);
ADC1data_t BSP_ADC1_Read(void);
ADC2data_t BSP_ADC2_Read(void);

#endif
